<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.DriverManager"%>
<%@ page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>login_result.jsp</title>

<script>
function init(){
	document.getElementById("btnOk").onclick=function(){
		location.href='index2.jsp?inc_content=./jsp/login.jsp';
	}
}

</script>
</head>
<body>

<jsp:useBean id="bean" class="member.Login" scope="page"/>
<!--  폼태그에 있었던 모든 입력항목이 클래스 Login에 모두 전달됨 -->
<jsp:setProperty property="*" name="bean"/>

<%
if(bean.login()){
	out.print("다시 찾아 주셔서 감사드려요.");
	out.print(bean.getMid()+"님...");
	session.setAttribute("mid", bean.getMid());
	
}else{
	out.print("아이디와 암호를 확인해 주세요..");
	
}

%>

<li>MID:<%=bean.getMid() %>
<li>PWD:<%=bean.getPwd() %>

<p/>
<input type="button" value='확인' id='btnOk'>
<script>init();</script>
</body>
</html>